@model OurWedding1.Models.Expense

@using OurWedding1

@* This partial view defines form fields that will appear when creating and editing entities *@



<div class="editor-label">
    @Html.LabelFor(model => model.Name)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Name)
    @Html.ValidationMessageFor(model => model.Name)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.ActualAmount)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.ActualAmount)
    @Html.ValidationMessageFor(model => model.ActualAmount)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.ExpenseType)
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.ExpenseTypeId, ((IEnumerable<OurWedding1.Models.ExpenseType>)ViewBag.PossibleExpenseTypes).Select(option => new SelectListItem {
        Text = (option == null ? @Resources.None : option.Name), 
        Value = option.ExpenseTypeId.ToString(),
        Selected = (Model != null) && (option.ExpenseTypeId == Model.ExpenseTypeId)
    }), @Resources.Choose)
    @Html.ValidationMessageFor(model => model.ExpenseTypeId)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.isNotIncluded)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.isNotIncluded)
    @Html.ValidationMessageFor(model => model.isNotIncluded)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.isFullyPaid)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.isFullyPaid)
    @Html.ValidationMessageFor(model => model.isFullyPaid)
</div>

@Html.HiddenFor(model=>model.WeddingId)

<div class="editor-label">
    Contractor
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.ContractorId, ((IEnumerable<OurWedding1.Models.Contractor>)ViewBag.PossibleContractors).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.ContractorId.ToString(),
        Selected = (Model != null) && (option.ContractorId == Model.ContractorId)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.ContractorId)
</div>
<div class="editor-label">
    ExpenseCategory
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.ExpenseCategoryId, ((IEnumerable<OurWedding1.Models.ExpenseCategory>)ViewBag.PossibleExpenseCategories).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.ExpenseCategoryId.ToString(),
        Selected = (Model != null) && (option.ExpenseCategoryId == Model.ExpenseCategoryId)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.ExpenseCategoryId)
</div>
